<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_foo_table.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:03 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/console/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/static/console/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/static/console/css/plugins/footable/footable.core.css" rel="stylesheet">
    <link href="/static/console/css/animate.min.css" rel="stylesheet">
    <link href="/static/console/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/static/console/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <script src="/static/console/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/console/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="/static/console/js/subpost.js"></script>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
            <!-- <div class="alert alert-info">
                31232
            </div> -->
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>管理员列表</h5>
                            {if condition="($Think.session.adminInfo.role_id == 0) or in_array('console/manager/add',$Think.session.accessesArray)"}
                            <div class="ibox-tools">
                                <a href="/console/manager/add" class="btn btn-primary btn-xs"><i class="glyphicon glyphicon-plus"></i> 新增管理员</a>
                            </div>
                            {/if}
                        </div>
                        <div class="ibox-content">

                            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="8">
                                <thead>
                                <tr>

                                    <th data-toggle="true">序号</th>
                                    <th data-hide="all">ID</th>
                                    <th data-hide="all">管理员账号</th>
                                    <th data-hide="all">所属角色</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $admins as $key => $val}
                                <tr>
                                    <td>{$key+1}</td>
                                    <td>{$val.id}</td>
                                    <td>{$val.name}</td>
                                    <td>{$val['role_name'] ? $val['role_name'] : '超级管理员'}</td>
                                    <td>
                                        {if condition="($Think.session.adminInfo.role_id == 0) or in_array('console/manager/edit',$Think.session.accessesArray)"}
                                        {if condition="$val['name'] != 'admin'"}
                                        <a href="{:url('console/manager/edit', array('id'=>$val['id']))}" class="btn btn-primary btn-xs">编辑</a>
                                        {/if}
                                        {/if}
                                        {if condition="($Think.session.adminInfo.role_id == 0) or in_array('console/manager/delete',$Think.session.accessesArray)"}
                                        {if condition="$val['name'] != 'admin'"}
                                        <a href="javascript:void(0)" data-url="{:url('console/manager/delete', array('id'=>$val['id']))}" onclick="del(this)" class="btn btn-danger btn-xs">删除</a>
                                        {/if}
                                        {/if}
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
</body>

</html>
